package br.ufg.inf.espweb.sgca.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.ForeignKey;

/**
 *
 * @author diCastro
 */
@Entity
public class Turma extends Entidade{
    @Getter
    @Setter
    private String nome;
    @Getter
    @Setter
    @Column(nullable = false)
    private String semestre;
    @Getter
    @Setter
    @Column(nullable = false)
    private Integer ano;
    @Getter
    @Setter
    @ManyToOne
    @JoinColumn(nullable = false)
    @ForeignKey(name = "fk_turma_has_disciplina")
    private Disciplina disciplina;
    @Getter
    @Setter
    @ManyToOne
    @JoinColumn(nullable = false)
    @ForeignKey(name = "fk_turma_has_professor")
    private Docente professor;
}
